package design_pattern.ObserveThread.basic;

/**
 * @Author: 蔡翔
 * @Date: 2019/10/30 11:22
 * @Version 1.0
 */
public abstract class Observer {
    // 别人修改了，会通知我这个抽象类。
    protected Subject subject;
    public Observer(Subject subject){
        this.subject = subject;
        this.subject.attach(this);
    }
    public abstract void update();
}
